package view;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Font;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JTable;
import javax.swing.border.EtchedBorder;
import javax.swing.ListSelectionModel;
import javax.swing.JRadioButton;
import javax.swing.border.BevelBorder;
import javax.swing.table.DefaultTableModel;
import java.awt.Dimension;
import java.awt.Rectangle;
import javax.swing.JList;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.UIManager;
import javax.swing.ImageIcon;
import javax.swing.AbstractListModel;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class TelaPrincipal {

	private JFrame frmPrincipal;
	JPanel PanelReservado;
	PanelPedido pedido;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaPrincipal window = new TelaPrincipal();
					window.frmPrincipal.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public TelaPrincipal() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmPrincipal = new JFrame();
		frmPrincipal.setResizable(false);
		frmPrincipal.setTitle("SOFTWARE GERENCIADOR DE PIZZARIA");
		
		frmPrincipal.setBounds(100, 100, 1024, 700);
		frmPrincipal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmPrincipal.getContentPane().setLayout(null);
		
		JPanel PanelImagemFundo = new JPanel();
		PanelImagemFundo.setBounds(0, 0, 1024, 700);
		frmPrincipal.getContentPane().add(PanelImagemFundo);
		PanelImagemFundo.setLayout(null);
		
		JPanel PanelMenu = new JPanel();
		PanelMenu.setLayout(null);
		PanelMenu.setBounds(10, 63, 188, 600);
		PanelImagemFundo.add(PanelMenu);
		
		JButton btnClientes = new JButton("Clientes");
		btnClientes.setBounds(10, 157, 166, 135);
		PanelMenu.add(btnClientes);
		
		JButton btnProdutos = new JButton("Produtos");
		btnProdutos.setBounds(10, 303, 166, 135);
		PanelMenu.add(btnProdutos);
		
		JButton button_2 = new JButton("Administra\u00E7\u00E3o");
		button_2.setBounds(10, 449, 166, 135);
		PanelMenu.add(button_2);
		
		JButton btnPedidos = new JButton("Pedidos");
		btnPedidos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				JFrame frmPedido = new JFrame();
				frmPedido.setBounds(100, 100, 1024, 700);
				PanelReservado.removeAll();
				PanelReservado.setVisible(true);
				pedido = new PanelPedido();
				pedido.setVisible(true);
				frmPedido.add(pedido);
				frmPedido.validate();
				frmPedido.setVisible(true);
				frmPedido.validate();
			}
		});
		btnPedidos.setBounds(10, 11, 166, 135);
		PanelMenu.add(btnPedidos);
		
		
		
		PanelReservado = new JPanel();
		PanelReservado.setBounds(208, 63, 800, 600);
		PanelImagemFundo.add(PanelReservado);
		PanelReservado.setLayout(null);
		
		JLabel lblNomeUsuarioExibicao = new JLabel("Fulano Silva");
		lblNomeUsuarioExibicao.setBounds(888, 11, 120, 14);
		PanelImagemFundo.add(lblNomeUsuarioExibicao);
		lblNomeUsuarioExibicao.setHorizontalAlignment(SwingConstants.RIGHT);
		lblNomeUsuarioExibicao.setFont(new Font("Tahoma", Font.PLAIN, 14));
		
		JLabel lblUsuario = new JLabel("Usu\u00E1rio:");
		lblUsuario.setBounds(803, 11, 75, 14);
		PanelImagemFundo.add(lblUsuario);
		lblUsuario.setHorizontalAlignment(SwingConstants.RIGHT);
		lblUsuario.setFont(new Font("Tahoma", Font.PLAIN, 14));
		
		JLabel lblDataHora = new JLabel("Quinta-feira, 11/10/2012 - 21:35:14");
		lblDataHora.setBounds(708, 36, 300, 26);
		PanelImagemFundo.add(lblDataHora);
		lblDataHora.setHorizontalAlignment(SwingConstants.RIGHT);
		lblDataHora.setFont(new Font("Tahoma", Font.PLAIN, 14));
	}
}
